﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LIMS.SqlServerDAL
{
    public class GradeService:LIMS.IDAL.IGrade
    {

        public Dictionary<Int32, String> FindIDandNo()
        {
            Dictionary<Int32, String> gradeDict = new Dictionary<int, string>();
            LIMSDataContext db = new LIMSDataContext();
            db.TB_Grade.Select(s => new { ID = s.gradeID, GradeNO = s.gradeNo }).ToList().ForEach(
                (item) =>
                {
                    gradeDict.Add(item.ID, item.GradeNO);
                });
            return gradeDict;
        }
    }
}
